/*
 * Copyright 2018 - YZTC
 * 
 * YZTC
 * 本公司保留所有下述内容的权利。
 * 本内容为保密信息，仅限本公司内部使用。
 * 非经本公司书面许可，任何人不得外泄或用于其他目的。
 */
package com.wxmp.wxcms.domain;

import java.lang.reflect.Field;
import java.util.Map;
import java.util.TreeMap;

/** 
 * @ClassName:RedGroupPack 
 * @Function: TODO ADD FUNCTION
 * @Reason:   TODO ADD REASON
 * @Date:     2019年3月6日 上午12:26:07 
 * @author   luck 
 * @version   
 * @since    JDK 1.8
 * @see       
 */
public class RedGroupPack{

    //红包金额设置方式：ALL_RAND
    protected String amt_type;
    //随机字符串
    protected String nonce_str;
    //签名
    protected String sign;
    //商户订单号
    protected String mch_billno;
    //商户号
    protected String mch_id;
    //公众账号appid 
    protected String wxappid;
    //商户名称
    protected String send_name;
    //用户openid
    protected String re_openid;
    //付款金额
    protected Integer total_amount;
    //红包发放总人数
    protected Integer total_num;
    //红包祝福语
    protected String wishing;
    //Ip地址
    protected String client_ip;
    //活动名称
    protected String act_name;
    //备注
    protected String remark;
    //场景id
    //protected String scene_id;
    //活动信息
    //protected String risk_info;

    public String getAmt_type() {
        return amt_type;
    }
    public void setAmt_type(String amt_type) {
        this.amt_type = amt_type;
    }
    public String getNonce_str() {
        return nonce_str;
    }
    public void setNonce_str(String nonce_str) {
        this.nonce_str = nonce_str;
    }
    public String getSign() {
        return sign;
    }
    public void setSign(String sign) {
        this.sign = sign;
    }
    public String getMch_billno() {
        return mch_billno;
    }
    public void setMch_billno(String mch_billno) {
        this.mch_billno = mch_billno;
    }
    public String getMch_id() {
        return mch_id;
    }
    public void setMch_id(String mch_id) {
        this.mch_id = mch_id;
    }
    public String getWxappid() {
        return wxappid;
    }
    public void setWxappid(String wxappid) {
        this.wxappid = wxappid;
    }
    public String getSend_name() {
        return send_name;
    }
    public void setSend_name(String send_name) {
        this.send_name = send_name;
    }
    public String getRe_openid() {
        return re_openid;
    }
    public void setRe_openid(String re_openid) {
        this.re_openid = re_openid;
    }
    public Integer getTotal_amount() {
        return total_amount;
    }
    public void setTotal_amount(Integer total_amount) {
        this.total_amount = total_amount;
    }
    public Integer getTotal_num() {
        return total_num;
    }
    public void setTotal_num(Integer total_num) {
        this.total_num = total_num;
    }
    public String getWishing() {
        return wishing;
    }
    public void setWishing(String wishing) {
        this.wishing = wishing;
    }
    public String getClient_ip() {
        return client_ip;
    }
    public void setClient_ip(String client_ip) {
        this.client_ip = client_ip;
    }
    public String getAct_name() {
        return act_name;
    }
    public void setAct_name(String act_name) {
        this.act_name = act_name;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public Map<String,Object> toMap(){
        Map<String, Object> map = new TreeMap<String, Object>();
        Field[] fields = this.getClass().getDeclaredFields();
        for (Field field : fields) {
            Object obj;
            try {
                obj = field.get(this);
                if(obj!=null){
                    map.put(field.getName(), obj);
                }
            } catch (IllegalArgumentException e) {
                e.printStackTrace();
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            }
        }
        return map;
    } 
}
